#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Kuiyuan Yang (kuiyuanyang@deepmotion.ai)


import sys
import subprocess

commands = [
    ['pdflatex', sys.argv[1] + '.tex'],
    ['bibtex', sys.argv[1] + '.aux'],
    ['pdflatex', sys.argv[1] + '.tex'],
    ['pdflatex', sys.argv[1] + '.tex']
]

for c in commands:
    subprocess.call(c)
